<template>
	<view class="main">
		<view class="v-box" v-if="rowlist.length>0">
			<view class="list-num dis-row poser" v-for="(item,index) in rowlist" :key="index">
				<view class="jifen">{{item.introduce?item.introduce:''}}{{item.inOut==10?'-':'+'}}{{item.num?item.num:1}}</view>
				<view class="times">{{item.createTime}}</view>
			</view>
		</view>
		<view class="v-box" v-if="rowlist.length == 0">
			<view class="empty-img">
				<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/icon50.png"></image>
			</view>
		</view>
		<view v-if="notMore==1" style="text-align: center; color: #333; line-height: 100rpx; background: #f3f3ff;">没有更多了...</view>
	</view>
</template>

<script>
import Index from "@/common/index-model.js"
let index = new Index();
let that = null;
export default {
	data() {
		return {
			rowlist:[],
			notMore:0,
			pageNo:1,
			pageSize:20
		}
	},
	onLoad() {
		this.getClicent()
	},
	onPullDownRefresh() {
		this.getClicent()
		setTimeout(function () {
			uni.stopPullDownRefresh();
		}, 1000);
	},
	onReachBottom() {
		if(this.notMore==0){
			this.getClicent();
		}
	},
	methods:{
		getClicent() {
			let send={
				pageNo:this.pageNo,
				pageSize:this.pageSize
			}
			index.getPublicUserMember(send,'client/individual/work/points','get',res=>{
				if(res.data.code == 200 && res.data.success && res.data.result.workRecord.length>0){
					if(this.pageNo==0){
						this.rowlist = res.data.result.workRecord
					}else{
						res.data.result.workRecord.forEach((item,i)=>{
							this.rowlist.push(item);
						})
					}
					this.pageNo+=1;
				}else{
					this.notMore=1;
				}
			})
		},
	}
}	
</script>

<style>
@import url("@/static/css/publics.css");	
@import url("@/static/css/pointsrecord.css");	
</style>